/*
 * @Description: 
 * @Date: 2021-11-02 11:21:30
 * @LastEditTime: 2021-11-03 10:21:45
 */
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default defineConfig({
  base: './',
  plugins: [vue()],
  server: {
    host: '0.0.0.0',
    port: 8080,
    proxy: {
      //正式
      "/api": {
        target: "http://v.juhe.cn/",
        rewrite: path => path.replace(/^\/api/, ''),
        changeOrigin: true, //是否跨域
      }
    }
  }
})

